{
  "builders": [
    <% builders.each do |builder| %>
    {
      "type":               "<%= builder.vmtype %>",
      "vm_name":            "DogDev",
      "communicator":       "winrm",
      "cpus":               "2",
      "memory":             "2048",
      "disk_size":          "262144",

      "iso_checksum":       "sha256:<%= builder.checksum %>",
      "iso_url":            "<%= builder.isourl %>",

      "shutdown_command":   "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",

      "winrm_username":     "dogdev",
      "winrm_password":     "dogdev",
      "winrm_timeout":      "15m",

      "floppy_files": [
        "<%= builder.autounattend %>",
        "./scripts/Enable-WinRM.ps1"
      ],
      <% if builder.vmtype == "vmware-iso" %>
      "guest_os_type": "<%= builder.ostype %>",
      "disk_adapter_type": "lsisas1068",
      "disk_type_id": "1",
      "headless": false,
      "tools_upload_flavor": "windows",
      "tools_upload_path": "c:/Windows/Temp/windows.iso",
      "version": 14,
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "vhv.enable": false
      },
      "vnc_port_max": 5980,
      "vnc_port_min": 5900
      <% end %>
      <% if builder.vmtype == "parallels-iso" %>
      "guest_os_type":              "<%= builder.ostype %>",
      "parallels_tools_flavor":     "win",
      "parallels_tools_mode":       "upload",
      "parallels_tools_guest_path": "c:/Windows/Temp/windows.iso",
      "prlctl": [
        ["set", "{{.Name}}", "--efi-boot",               "off"],
        ["set", "{{.Name}}", "--nested-virt",            "off"],
        ["set", "{{.Name}}", "--faster-vm",              "on"],
        ["set", "{{.Name}}", "--disable-winlogo",        "on"],
        ["set", "{{.Name}}", "--battery-status",         "off"],
        ["set", "{{.Name}}", "--resource-quota",         "unlimited"],
        ["set", "{{.Name}}", "--adaptive-hypervisor",    "on"],
        ["set", "{{.Name}}", "--3d-accelerate",          "off"],
        ["set", "{{.Name}}", "--shared-profile",         "off"],
        ["set", "{{.Name}}", "--shared-cloud",           "off"],
        ["set", "{{.Name}}", "--sh-app-guest-to-host",   "off"],
        ["set", "{{.Name}}", "--sh-app-host-to-guest",   "off"]
      ]
      <% end %>
      <% if builder.vmtype == "virtualbox-iso" %>
      "guest_os_type":        "<%= builder.ostype %>",
      "headless":             false,
      "post_shutdown_delay":  "10s",
      "guest_additions_mode": "upload",
      "guest_additions_path": "c:/Windows/Temp/windows.iso",
      "hard_drive_interface": "sata"
      <% end %>
    }
    <% if(builder != builders.last) %>
    ,
    <% end %>
    <% end %>
  ],
  "post-processors": [
    {
      "keep_input_artifact": false,
      "output": "<%= name %>_{{.Provider}}.box",
      "type": "vagrant",
      "vagrantfile_template": "<%= vagrantfile %>"
    }
  ],
  "provisioners": [
    {
      "type": "powershell",
      "elevated_user": "dogdev",
      "elevated_password": "dogdev",
      "scripts": [
        "./scripts/Install-GuestTools.ps1",
        "./scripts/Install-DevEnv.ps1",
        "./scripts/Disable-WinRM.ps1"
      ]
    }
  ]
}

